package com.monitor.controller.back;

import com.monitor.controller.BaseController;
import com.monitor.pojo.TaskInfo;
import com.monitor.service.TaskInfoService;
import com.monitor.vo.TaskVo;
import com.sun.xml.internal.rngom.parse.host.Base;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TaskController
 * @Package com.monitor.controller.back
 * @Description TODO
 * @Author zhixingbai
 * @Create 2018/10/1517:15
 */
@RestController
@RequestMapping("/back/task")
public class TaskController extends BaseController {

    @Autowired
    private TaskInfoService taskInfoService;

    @RequestMapping("/info")
    public Object info(TaskVo taskVo){
      return taskInfoService.selectTaskList(taskVo);
    }

    @RequestMapping(value = "/edit",method = RequestMethod.POST)
    public Object edit(TaskInfo taskInfo){
        return taskInfoService.editTask(taskInfo);
    }
}
